
///
 function registerLanguageAPI(contextBridge, ipcRenderer) {
    contextBridge.exposeInMainWorld('languageAPI', {
        getLanguage: () => ipcRenderer.send('get-language'),
        languageChanged: (callback) => ipcRenderer.on('change-language', callback),
        setLanguage: (lang) => ipcRenderer.send('set-language',lang),
        loadLanguageFiles: (map) => ipcRenderer.invoke('set-language-file', map)
    });
}


// ✅ CommonJS 导出
module.exports = { registerLanguageAPI };